package cassys.actions.classGroupManagement;

import com.opensymphony.xwork2.ActionSupport;
import cassys.domain.classManagement.*;
import cassys.ejb.clients.ClassGroupManagementDelegate;
import java.util.List;

/**
 *
 * @author User
 */
public class ListClassGroups extends ActionSupport {

    private ClassGroupManagementDelegate classGroupDelegate;
    private List<ClassGroup> classGroupList;

    public ListClassGroups() {
        classGroupDelegate = new ClassGroupManagementDelegate();
    }

    @Override
    public String execute() throws Exception {
        System.out.println("ListClassGroups");
        this.classGroupList = classGroupDelegate.getAllClassGroups();
        System.out.println("got the ListClassGroups: "+ classGroupList.size());
        return SUCCESS;
    }

    public List<ClassGroup> getClassGroupList() {
        return classGroupList;
    }
}
